package com.qqs.distributed.annotation;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Cache {
    CacheType cacheType() default CacheType.REDIS;

    LockType lockType() default LockType.REDISSON;

    String cacheKeyExpr() default "";

    String bloom() default "";

    long ttl() default -1L;

    TimeUnit ttlUnit() default TimeUnit.MILLISECONDS;

    long lockTtl() default 10000L;

    TimeUnit lockTtlUnit() default TimeUnit.MILLISECONDS;
}
